package com.suishoupai.xmb.dao;

import com.suishoupai.xmb.entity.CutGoods;
import com.suishoupai.xmb.entity.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by caojian on 2017/3/23.
 */
public interface CutGoodsMapper {
    List<CutGoods> selectBySaleId(@Param("saleId") long saleId);

    List<CutGoods> selectEnableBySaleId(@Param("saleId") long saleId);

    CutGoods selectByPrimaryKey(@Param("id") long id);

    List<Goods> selectInPrimaryKey(@Param("goodsIds") List<Long> goodsIds);

    int updateByPrimaryKeySelective(Goods goods);

    int addNumber(@Param("id") long id,@Param("number") long number);

    int reduceNumber(@Param("id") long id,@Param("number") long number);

    long selectCountByCategoryId(@Param("categoryId") long categoryId);

    int addSalesVolume(@Param("id") long id,@Param("count") long count);
}
